import requests

url = "http://118.121.200.162:8086/api/v5/department"
type = ["all", "group", "top", "child"]
for i in range(len(type)):
    cx = {
        "type": type[i]
    }
    if type[i] == "child":
        cx = {
            "type": type[i],
            "parentDepartmentId": 1000
        }
    response = requests.get(url, params=cx)
    print(response.json())
    assert len(response.json())>0
